home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 October / MACPOWER-1997-10.ISO.7z / MACPOWER-1997-10.ISO / AMUG / INTERNET / HTML Grinder 3.21.sit / HTML Grinder / Grinder Tools / Eight Dot Three / background_3802.xml next >
Extensible Markup Language  |  1997-07-01  |  10KB  |  44 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>3802</id>
  5.     <filler1>0</filler1>
  6.     <cantDelete> <false /> </cantDelete>
  7.     <showPict> <true /> </showPict>
  8.     <dontSearch> <false /> </dontSearch>
  9.     <link rel="stylesheet" type="text/css" href="stylesheet_3315.css" />
  10.     <part>
  11.         <id>5</id>
  12.         <type>button</type>
  13.         <visible> <true /> </visible>
  14.         <reserved5> 0 </reserved5>
  15.         <reserved4> 0 </reserved4>
  16.         <reserved3> 0 </reserved3>
  17.         <reserved2> 0 </reserved2>
  18.         <reserved1> 0 </reserved1>
  19.         <enabled> <true /> </enabled>
  20.         <rect>
  21.             <left>0</left>
  22.             <top>167</top>
  23.             <right>15</right>
  24.             <bottom>184</bottom>
  25.         </rect>
  26.         <style>opaque</style>
  27.         <showName> <false /> </showName>
  28.         <highlight> <false /> </highlight>
  29.         <autoHighlight> <true /> </autoHighlight>
  30.         <sharedHighlight> <true /> </sharedHighlight>
  31.         <family>0</family>
  32.         <titleWidth>0</titleWidth>
  33.         <icon>29540</icon>
  34.         <textAlign>center</textAlign>
  35.         <font>Chicago</font>
  36.         <textSize>12</textSize>
  37.         <textStyle>plain</textStyle>
  38.         <name>Help</name>
  39.         <script>on mouseUpfullhelpend mouseUpon mouseenterhelper "Click here for more help for HTML Grinder."end mouseenter</script>
  40.     </part>
  41.     <name></name>
  42.     <script>on processglobal allfilesput line 2 of cd fld basefolder into thebasefolderif there is no folder thebasefolder thenbeepanswer "The specified base folder could not be found. Choose the folder that contains your Web site."exit processend ifif thebasefolder is not in allfiles thenbeepanswer "None of the files you dragged to the Grinder are located inside the specified base folder. Please double-check."exit processend ifput allfiles into oldnamesput the number of lines in allfiles into numfilesput empty into newnames--FIGURE OUT WHAT FOLDERS TO CHANGEput empty into newfoldernamesput getdir(line 2 of cd fld "basefolder","D+","o=p") into thefoldersput the number of lines in thefolders into numfolders--put 4 into whatprop --how big a chunk of the thermometer should the links take?put (numfolders*2) + (numfiles*whatprop) +numfiles +numfiles into themaxget windowscript("grinding...")set thermometer_max of window "grinding..." to themax--repeat with x=1 to numfoldersset thermometer_value of window "grinding..." to xif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "grinding..." to "grinder"&iconnumset cursor to busy--put line x of thefolders into wholefolderpathif last char of wholefolderpath is ":"then delete last char of wholefolderpath --get rid of trailing colonset the itemdelimiter to ":"put last item of wholefolderpath into thisfolderput wholefolderpath into parentfolderdelete last item of parentfolderif last char of parentfolder is ":"then delete last char of parentfolder --get rid of trailing colonset the itemdelimiter to ","--put dumbfolder(parentfolder,thisfolder,newfoldernames) into newnameif parentfolder &":" is not thebasefolder thenput lineoffset(parentfolder,thefolders) into thelineput line theline of newfoldernames into newparentnameput newparentname & newname &":" into line x of newfoldernameselseput parentfolder & ":" & newname &":" into line x of newfoldernamesend ifend repeatput thebasefolder &return before thefoldersput thebasefolder &return before newfoldernamesadd 1 to numfolders----FIGURE OUT FILES TO CHANGErepeat with x=1 to numfilesset thermometer_value of window "grinding..." to x+numfoldersif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "grinding..." to "grinder"&iconnumset cursor to busy--put line x of oldnames into thisfileput folder(thisfile) into thefolderput filename(thisfile) into theshortnameget lineoffset(thefolder,thefolders)put line it of newfoldernames into newfoldernameput dumbdown((newfoldername & theshortname),newnames) into thenewnameput thenewname into line x of newnames-- put newfoldername & theshortname into line x of newnamesend repeat--FIGURE LINKSrepeat with x =1 to numfilesset thermometer_value of window "grinding..." to (x*whatprop)+numfolders+numfilesif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "grinding..." to "grinder"&iconnumset cursor to busy--put line x of oldnames into thisfileput filecontents(thisfile) into thecontentsif thecontents is empty then next repeat--put linklist(thisfile,thecontents,"good") into allLinksput inlinedimages(thisfile,thecontents) after allLinksput empty into linkstofix--repeat with y=1 to the number of lines in allLinksif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "grinding..." to "grinder"&iconnumset cursor to busy--put line y of allLinks into thislinkif "ERROR:" is in item 2 of thislink then next repeatput item 4 of thisLink into thelinkedfileput lineoffset(thelinkedfile,oldnames) into thelineif theline < 1 then next repeatput line theline of newnames into thisnewnameif thisnewname <> thelinkedfile thenput item 5 of thislink into oldfileRefput relativepath(thisfile,thisnewname) into newfileRefput item 6 of thislink & "," & item 7 of thislink ツャ&","& item 10 of thislink &","& item 11 of thislinkツャ& "," & oldfileref &"," & newfileRef &return after linkstofixend ifend repeat--CHANGE THE LINKSput thecontents into newcontentssort lines of linkstofix numeric by item 1 of eachrepeat with z=the number of lines in linkstofix down to 1set cursor to busyput line z of linkstofix into fixthisoneput item 1 of fixthisone into thestartput item 2 of fixthisone into theEndput item 3 of fixthisone into refstartput item 4 of fixthisone into refendput item 5 of fixthisone into oldfilerefput item 6 of fixthisone into newfileRefput char thestart to theEnd of newcontents into thelinkget char refstart to refEnd of thelinkput newfileref into char refstart to refend of thelink-- put findreplace(thelink,oldfileref,newfileRef) into thelink-- if "ERROR:" is not in thelink-- thenput thelink into char thestart to theend of newcontentsend repeatif newcontents <> thecontentsthen replacefile thisfile,newcontentsend repeat--NOW CHANGE FILE NAMESrepeat with x=1 to numfilesset thermometer_value of window "grinding..." to x+(numfiles*whatprop)+numfolders+numfilesif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "grinding..." to "grinder"&iconnumset cursor to busy--put line x of oldnames into thisfileput line x of newnames into thenewnameput filename(thenewname) into thenewnamefullrename thisfile,thenewnameend repeat----NOW CHANGE FOLDER NAMESrepeat with x= numfolders down to 1put abs(x - numfolders -1) into thestepset thermometer_value of window "grinding..." to thestep+numfiles+(numfiles*whatprop)+numfolders+numfilesif iconnum is 1then put 3 into iconnumelse put 1 into iconnumset i3_name of window "grinding..." to "grinder"&iconnumset cursor to busy--put line x of thefolders into thisfolderput line x of newfoldernames into thenewnamedelete last char of thenewnameput filename(thenewname) into thenewnamefullrename thisfolder,thenewnameend repeatclose window "grinding..."alldone-- put oldnames into cd fld oldies-- put newnames into cd fld newbiesend processfunction filecontents thisfileif filetype(thisfile) is "TEXT" thenopen file thisfileif the result is not empty then return emptyread from file thisFile until eofput it into thecontentsclose file thisfilereturn thecontentselse return emptyend filecontentsfunction dumbdown oldfilename,existingnewnames,existingnewfoldersput filename(oldfilename) into oldnameput folder(oldfilename) into thefolderget nameandsuffix(oldname)put line 1 of it into longnameput line 2 of it into longsuffixput dotstounderscores(longname) into longnameput char 1 to 8 of longname into thenameif longsuffix is "jpeg"then put "jpg" into thesuffixelse put char 1 to 3 of longsuffix into thesuffixif char 8 of thename is "_" then put char 9 of longname into char 8 of thenameput changecase(thename,2) into thenameput changecase(thesuffix,2) into thesuffixput 0 into nameattemptsrepeat foreverput thefolder & thename & "." & thesuffix into newnameif (newname) is in existingnewnames thenadd 1 to nameattemptsput 9 - (length(nameattempts)) into startcharput nameattempts into char startchar to 8 of thenamenext repeatelse exit repeatend repeatreturn newnameend dumbdownfunction dumbfolder parentfolder,thisfolder,existingnewnamesput dotstoUnderscores(thisfolder) into thisfolderput char 1 to 8 of thisfolder into thenameif char 8 of thename is "_" then put char 9 of thisfolder into char 8 of thenameput changecase(thename,2) into thenameput 0 into nameattemptsrepeat foreverput parentfolder &":"& thename into newnameif (newname) is in existingnewnames thenadd 1 to nameattemptsput 9 - (length(nameattempts)) into startcharput nameattempts into char startchar to 8 of thenamenext repeatelse exit repeatend repeatreturn thenameend dumbfolderfunction dotstounderscores thetextrepeat with x=1 to length(thetext)if char x of thetext is in  ". "then put "_" into char x of thetextend repeatreturn thetextend dotstounderscoresfunction nameandsuffix fullnameput empty into thenameput empty into thesuffixrepeat with x = length(fullname) down to 1if char x of fullname is "." thenput char x+1 to 1000 of fullname into thesuffixput char 1 to x-1 of fullname into thenameexit repeatend ifend repeatif thename is empty thenput fullname into thenameput empty into thesuffixend ifreturn thename & return & thesuffixend nameandsuffixon resetwheelput empty into cd fld basefolderpass resetwheelend resetwheel</script>
  43. </background>
  44.